import http  from "@/utils/request";

// 请求首页数据

export const getData = () => {
    //返回一个promise对象
    return http.get('/home/getData')
}

export const getHerbalList = (params) =>{
    return http.get('/chineseHerbalMedicine/getHerbalList',params)
}

export const createHerbal = (data) =>{
    return http.post('/chineseHerbalMedicine/createHerbal',data)
}

export const updateHerbal = (data) =>{
    return http.post('/chineseHerbalMedicine/updateHerbal',data)
}

export const deleteHerbal = (data) =>{
    return http.post('/chineseHerbalMedicine/deleteHerbal',data)
}

export const getMenu = (data) =>{
    return http.post('/permission/getMenu',data)
}